/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.mer.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaaction.common.persistence.Page;
import com.kaaction.common.service.CrudService;
import com.kaaction.modules.mer.entity.OrderSku;
import com.kaaction.modules.mer.dao.OrderSkuDao;

/**
 * OrderSkuService
 * @author zengbiao
 * @version 2017-05-22
 */
@Service
@Transactional(readOnly = true)
public class OrderSkuService extends CrudService<OrderSkuDao, OrderSku> {

	public OrderSku get(String id) {
		return super.get(id);
	}
	
	public List<OrderSku> findList(OrderSku orderSku) {
		return super.findList(orderSku);
	}
	
	public Page<OrderSku> findPage(Page<OrderSku> page, OrderSku orderSku) {
		return super.findPage(page, orderSku);
	}
	
	@Transactional(readOnly = false)
	public void save(OrderSku orderSku) {
		super.save(orderSku);
	}
	
	@Transactional(readOnly = false)
	public void delete(OrderSku orderSku) {
		super.delete(orderSku);
	}
	
	@Transactional(readOnly = false)
	public void deleteByUserAndSku(String openId, String skuId) {
		super.dao.deleteByUserAndSku(openId,skuId);
	}

	public OrderSku findOrderSku(String openId, String skuId,String type) {
		return super.dao.findOrderSku(openId,skuId,type);
	}

	@Transactional(readOnly = false)
	public void updateAllStatus(String status, String openId) {
		super.dao.updateAllStatus(status,openId);
	}
	
}